<section id="main-content">
  <section class="wrapper">
    <!--state overview end-->
    <div class="row">
      <div class="col-lg-12">
        <section class="panel">
          <header class="panel-heading">
            基本信息
          </header>
          <div class="panel-body">
            <div class="bio-row">
              <p>
                <span>申请人 </span>{{createUser}}</p>
            </div>
            <div class="bio-row">
              <p>
                <span>归属项目 </span>{{proName}}</p>
            </div>
            <div class="bio-row">
              <p>
                <span>开始日期 </span>{{beginTime | date:'yyyy-MM-dd'}}&nbsp;&nbsp;{{start}}</p>
            </div>
            <div class="bio-row">
              <p>
                <span>结束日期 </span>{{endTime | date:'yyyy-MM-dd'}}&nbsp;&nbsp;{{end}}</p>
            </div>
            <div class="bio-row">
              <p>
                <span>加班天数 </span>{{vacationDay}}天</p>
            </div>
            <div class="bio-row">
              <p>
                <span>加班总时长 </span>{{totalHour}}小时</p>
            </div>
            <div class="bio-row">
              <p>
                <span>状态 </span>{{status}}</p>
            </div>
            <div class="bio-row line-row">
              <p>
                <span>说明 </span>{{comments}}</p>
            </div>
          </div>
        </section>

        <!-- <section class="panel">
          <header class="panel-heading">审批意见</header>
          <div class="panel-body">
            <div class="form-group customerForm">
             
                <textarea class="form-control" name="opinionMsg" disabled maxlength="250" id="opinionMsg">{{opinionMsg}}</textarea>
              
            </div>


            
          </div>
        </section> -->

        <section class="panel">
            <div class="panel-body">
                <!-- <p class="default-buttons">
                    <a href="javascript:void(0);" class="button-next btn btn-info" onclick="window.history.back()">返回</a>
                  </p> -->
                  <p class="default-buttons">
                      <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                      <a href="javascript:void(0);" class="button-next  btn btn-info" onclick="window.history.back()">确认</a>
                  </p>
            </div>
        </section>

        <section class="panel">
          <div class="panel-heading">
            审批记录
          </div>
          <div class="panel-body">
            <ul class="tp-ulst" id="containerUl">
              <li>
                <span>人员姓名</span><span>提交时间</span><span>处理结果</span>
              </li>
            </ul>
          </div>
        </section>

      </div>
    </div>
  </section>
</section>
<script type="text/javascript">
    function findOver($scope, CertusFormAjax, $routeParams) {
        CertusFormAjax.ajax("findJbWorkList",{"processId":$routeParams.processId}, function(result){
            var data = result.data;
            $scope.createUser = data.createUser;
            $scope.proName = data.proName;
            $scope.beginTime = data.beginTime;
            $scope.start = data.start;
            $scope.endTime = data.endTime;
            $scope.end = data.end;
            $scope.vacationDay = data.vacationDay;
            $scope.totalHour = data.totalHour;
            $scope.comments = data.comments;
            $scope.opinionMsg = data.opinionMsg;
            $scope.id = data.id;

            var content="";
            var value=data.nodeFlag;
            if (value=="1"){
                content += '申请中';
            }else if (value=="2"){
                content += '已退回';
            }else if (value=="3"){
                content += '拒绝';
            }else if (value=="4"){
                content += '待审批';
            }else if (value=="5"){
                content += '审批通过';
            }
            $scope.status = content;
        });

        CertusFormAjax.ajax("findJbWorkNodes", {
            "processId": $routeParams.processId
        }, function (result) {
            var data = result.data;
            var html = "";
            var dlength = data.length;
            for (var i = 0; i < dlength; i++) {
                html+="<li><span>"+data[i].createUser+"</span><span>"+data[i].createTime+"</span>";
                if (data[i].nodeFlag==1){
                    html+="<span>发起申请</span>";
                }else if (data[i].nodeFlag==2){
                    html+="<span>退回，审批意见："+data[i].opinionMsg+"</span>";
                }else if (data[i].nodeFlag == 3){
                    html+="<span>拒绝，审批意见："+data[i].opinionMsg+"</span>";
                }else if (data[i].nodeFlag==4){
                    html+="<span>同意，审批意见："+data[i].opinionMsg+"</span>";
                }else{
                    html+="<span>审批通过，审批意见："+data[i].opinionMsg+"</span>";
                }
                html+="</li>";
            };
            $("#containerUl").append(html);
        });
    }

</script>